#ifndef __EVENTLOOPTHREAD_H__
#define __EVENTLOOPTHREAD_H__

#include "thread.h"
#include "../Base/mutex.h"
#include "../Base/condition.h"
#include "Base/noncopyable.h"

namespace tiny_muduo
{
    class EventLoop;

    class EventLoopThread : public NonCopyable
    {
    public:
        EventLoopThread();
        ~EventLoopThread();

        void StartFunc();
        EventLoop* StartLoop();

    private:
        EventLoop* loop_;
        Thread thread_;
        MutexLock mutex_;
        Condition cond_;
    };
}
#endif
